home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / Testing & Debugging / Memory Management / Debugging Modern Memory Manager / Debug MemMgr 1.0.5 - Read Me! next >
Encoding:
Text File  |  1995-11-01  |  5.1 KB  |  66 lines  |  [ttro/ttxt]

  1. How to use the Debugging Memory Manager for Power Macintosh
  2.  
  3. 10/20/95
  4.  
  5. • Brief Overview
  6.  
  7. The Debugging  Memory Manager (aka DMM) is a debugging version of the Modern Memory Manager.  Once DMM loads all memory manager heaps created will have robust checking capability.
  8.  
  9. Installing DMM onto your machine will allow you to catch many of the popular memory manager programming errors.  Code using disposed blocks will encounter problems because blocks are filled with garbage after a DisposePtr or DisposeHandle call.  Writing over the end of blocks will result in heap check routines failing. Passing fake or bogus handles to the Memory Manager will result in errors being reported via the DebugStr mechanism.  
  10.  
  11. • How it can be configured
  12.  
  13. The “Debug Memory Mgr” control panel allows users to set the level of validation required.  Set Debugging to the off position and no more errors will be reported, turn it on then the default validation checking errors will be reported along with any of the options you have chosen.  There are four different options that can be set by the developer:
  14.  
  15. 1. Check Heap On Entry - Before doing an operation, all memory blocks, headers, and trailers are validated to ensure that nothing has been over written.  This is useful to find if anything you are doing between memory manager calls could possibly be corrupting memory manager data structures Since a complete heap check is done for every call to the Memory Manager, this will definitely slow your machine to a crawl.
  16.  
  17. 2. Check Heap on Exit - This routine does the same checking as “Check Heap On Entry” but does it after the call has been completed.  This is useful for detecting subtle bugs in GrowZone and PurgeProc routines in your application.
  18.  
  19. 3. Fill Free Blocks - Whenever a block is disposed, emptied or purged the memory it occupied is filled with a garbage pattern.  This quickly helps determine when your program uses data in disposed blocks.  Unlike heap checking, this has very little impact on performance.
  20.  
  21. 4. Check Blocks - When the memory manager is passed a handle or a pointer, a basic validity check is made to make sure that the address is valid.  This option tells the memory manager to perform even more robust validation of the passed in pointer or handle.
  22.  
  23. • Machines and Systems it will work with
  24.  
  25. The DMM will work with all currently shipping Power Macintosh machines, running 7.1.2 or later.  And of course the DMM only runs when you have the Modern Memory Manager turned on in the Memory control panel.  If you install a system update over top of the DMM, then you will need to reinstall the DMM.  
  26.  
  27. • Known Gotchas
  28.  
  29. Currently there are no known problems with the DMM itself, but there are some things to be aware of:  
  30.  
  31. > If you attempt to use the DMM with VM turned on, do not attempt to use the heap checking or block filling routines.  While they will function properly, they will cause you machine performance to drop to nearly ususable levels.
  32.  
  33. > When using the Chooser, the DMM will report many times that bogus handles are being passed.  If you plan to use the Chooser, it might be a wise idea to temporarily turn off debugging until you are finished.
  34.  
  35. > Unfortunately the System heap cannot have the same level of robust checking that other heaps are capable of having.  But, new in version 1.0.3, heap checking is performed on the System heap to the highest completeness level possible.  Disposed blocks in the System cannot yet be filled in at present time due to compatability concerns.
  36.  
  37. >Do not use older versions of the DMM init and Control Panel with the 1.0.5 DMM, the heap structure has changed, and the init  and control panel need to stay in synch.
  38.  
  39. > Once installed, you can use the installer application to install a non-debugging version of the Memory Manager.  Note: this may not be the same version of the Memory Manager that was installed in the System before installing the DMM.
  40.  
  41. • Reporting problems
  42.  
  43. If you find any bugs with DMM,have any problems, comments, suggestions, or words of encouragement.  please mail  DMMM@powertalk.apple.com with you inquiries  (Note: Although the name has changed to DMM, the mail address is still DMMM).  Suggestions on improvements are always welcome.
  44.  
  45. • Revision History
  46.  
  47. 1.0         - Initial Version. (Only limited release outside of Apple)
  48.  
  49. 1.0.1 - Added the ability to remove the debugging memory manager and install a non-debug 
  50.            version.
  51.  
  52. 1.0.2 - Fixed an incompatability when Virtual Memory was turned on.
  53.  
  54. 1.0.3 - Toughened bogus handle check routine. 
  55.         PC Exchange no longer triggers a debugstr on startup.
  56.                        Disabling all extensions also turns Debugging Memory Manager into off mode.
  57.                                 Sys and Clear trapword options are now reflected in error messages.
  58.                                 Robust heap checking now occurs in the System heap as well.
  59.                                 Memory manager version updated to new CPU release version.
  60.  
  61. 1.0.4 - EmptyHandle check was a little too robust.  Restoring checking to proper levels.
  62.  
  63. 1.0.5 - Memory manager version updated to new CPU release version.
  64.         Fixed compatibility problem with ASLM and DMM (most visible with TCP/IP).
  65.                                 Changed name from DMMM to DMM.
  66.